1. Field of the Invention
The present invention relates to signal processing, and, in particular, to encoding video and other image signals using variable-length encoding techniques.
2. Description of the Related Art
In digital video encoding, it is common to employ variable-length encoding techniques to compress data representative of the video signals. In variable-length encoding, more frequently occurring data values are represented in the resulting encoded bitstream using shorter codes, while longer codes are reserved for those data values that occur less frequently. In this way, the total number of bits used to represent all of the data can be smaller than the number of bits used to represent the data using a fixed-length scheme.
Many video encoding schemes use a defined set of variable-length (VL) codes to represent a set of fixed-length data. A huffman table is such a defined set of VL codes. Both the encoders and decoders that conform to such a video encoding scheme may be preprogrammed with a particular huffman table. A conforming decoder will then be able to apply the preprogrammed huffman table to decode the VL codes in a bitstream generated by a conforming encoder. Alternatively, the structure of the huffman table may be defined in the bitstream. The decoder may then generate the huffman table from its defined structure.
A defined huffman table will provide optimal VL encoding for a set of fixed-length data, if the statistics of the data match those of the huffman table. If the actual fixed-length data to be encoded has a probability distribution that differs sufficiently from the statistics of the defined huffman table, then that huffman table will provide less than optimal VL encoding for that set of data. What is needed is a scheme for improving the VL encoding of a wide variety of fixed-length data using a defined huffman table.
Further objects and advantages of this invention will become apparent from the detailed description of a preferred embodiment which follows.